import * as XLSX from "xlsx";
// 数据生成表格

export function leadingOut(data, name = "数据.xlsx") {
  return new Promise((resolve, reject) => {
    const worksheet = XLSX.utils.aoa_to_sheet(data);
    const workbook = XLSX.utils.book_new();
    XLSX.utils.book_append_sheet(workbook, worksheet, "Sheet1");
    XLSX.writeFile(workbook, "设备列表.xlsx");
    resolve();
  });
}
